#ifndef FACIAL_RECOGNITION_SYSTEM_CONFIG_H__
#define FACIAL_RECOGNITION_SYSTEM_CONFIG_H__
#include <iostream>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/ini_parser.hpp>

using namespace std;

namespace ai::facial_recognition {

class SystemConfig {
  public:
  /**
   * @brief Construct a new Logger object
   * 
   */
  SystemConfig();
  ~SystemConfig();

  template<typename T>
  T readKey( std::string section, std::string key, T defaults)
  {
    auto pt_section = ptfile_.get_child_optional(section);
    if (pt_section.is_initialized()) {
      T value = pt_section.get().get<T>(key, defaults);
      return value;
    } else {
      return defaults;
    }
   }
  private:
  std::string file_name_;
  boost::property_tree::ptree ptfile_;
};

}


#endif // FACIAL_RECOGNITION_SYSTEM_CONFIG_H__